import 'package:hm_show_flutter/entity/user.dart';

class UserInfoEntity {
	int errno;
	UserInfoData data;
	String errmsg;

	UserInfoEntity({this.errno, this.data, this.errmsg});

	UserInfoEntity.fromJson(Map<String, dynamic> json) {
		errno = json['errno'];
		data = json['data'] != null ? new UserInfoData.fromJson(json['data']) : null;
		errmsg = json['errmsg'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['errno'] = this.errno;
		if (this.data != null) {
      data['data'] = this.data.toJson();
    }
		data['errmsg'] = this.errmsg;
		return data;
	}
}

class UserInfoData {
	UserModel user;

	UserInfoData({this.user});

	UserInfoData.fromJson(Map<String, dynamic> json) {
		user = json['user'] != null ? new UserModel.fromJson(json['user']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.user != null) {
      data['user'] = this.user.toJson();
    }
		return data;
	}
}

